home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 21.zip
/
BS1 part 21
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].7z
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].adf
/
rexx.lzh
/
StepAndRepeat.pprx
< prev
next >
Wrap
Text File
|
1992-03-13
|
2KB
|
98 lines
/*
@BStepAndRepeat @P@ICopyright Gold Disk Inc., February, 1992
This Genie will make multiple copies of a box with user specified offset and rotation between copies.
*/
cr = '0a'x
address command
call SafeEndEdit.rexx()
units = ppm_GetUnits()
if units = 3 then
call ppm_SetUnits(1)
signal on halt
signal on break_c
signal on break_e
signal on break_d
form = "Columns"cr"Rows"cr"Gutter"
/* This Genie allows user to duplicate, move and rotate a box
* in one step
*/
box = ppm_ClickOnBox("Click on box to duplicate..")
if box = 0 then exit_msg()
dup = 0
boxpos = ppm_GetBoxPosition(box)
cur_x = word(boxpos, 1 )
cur_y = word(boxpos, 2 )
boxsize = ppm_GetBoxSize(box)
width = word(boxsize, 1 )
height = word(boxsize, 2 )
if units = 3 then
do
call ppm_ShowStatus("Position: " || ppm_ConvertUnits(1, 3, cur_x) || ", " || ppm_ConvertUnits(1, 3, cur_y) || " size: w" || ppm_ConvertUnits(1, 3, width) || ", h" || ppm_ConvertUnits(1, 3, height))
form = "count:1"cr"horizontal offset:" || ppm_ConvertUnits(1, 3, width)||cr"vertical offset:" || ppm_ConvertUnits(1, 3, height)||cr"angle"
end
else
do
call ppm_ShowStatus("Position: "cur_x", "cur_y" size: w"width", h"height)
form ="count:1"cr"horizontal offset:"width||cr"vertical offset:"height||cr"angle"
end
form = ppm_GetForm("Step & Repeat", 8, form)
if form = '' then exit_msg()
parse var form count '0a'x horizontal '0a'x vertical '0a'x angle
if count = '' then count = 1
if horizontal = '' then horizontal = 0
if vertical = '' then vertical = 0
if angle = '' then angle = 0
if ~(datatype(count, n) & datatype(horizontal, n) & datatype(vertical, n) & datatype(angle, n)) then exit_msg("Invalid Entry")
if units = 3 then
do
horizontal = ppm_ConvertUnits(3, 1, horizontal)
vertical = ppm_ConvertUnits(3, 1, vertical)
end
call ppm_AutoUpdate(0)
rotationangle = angle
do i = 1 to count
newbox = ppm_CloneBox(box, horizontal, vertical)
if angle ~= 0 then
do
call ppm_SetBoxAngle(newbox, rotationangle)
rotationangle = rotationangle + angle
end
box = newbox
end
exit_msg()
break_d:
break_e:
break_c:
halt:
call exit_msg("User aborted Genie!")
exit_msg: procedure expose units
do
parse arg message
if message ~= '' then call ppm_Inform(1, message,)
call ppm_ClearStatus()
if units = 3 then call ppm_SetUnits(3)
call ppm_AutoUpdate(1)
exit
end